<style>
table{
padding:0 0 0 0;
margin:0 0 0 0;
}
</style>
<div class="pageContent">
	
	<form method="post" action="/index.php?act=admin&st=update_authory" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<input name="userid" value="{$userid}" type="hidden">
		<div class="pageFormContent" layoutH="58">
		<!--table 表格-->
			<center><table border="1" width="700px" style="">		
				<tbody>
					{foreach item=items from=$authes key=key}
						<tr width="100%" align="left">
							<td rowspan="<?php echo count($this->_var['items']['childs']) + 1; ?>">
								<label>
									<input type="checkbox" group="category_{$items.id}[]" class="checkboxCtrl" {if in_array($items.id, $parents)}checked{/if}/>{$items.authority_name}
									<input type="hidden" name="category[]" value="{$items.id}">
								</label>
							</td>
						</tr>
						{foreach item=children from=$items.childs}
							<tr width="100%" style="padding:0 0 0 0;margin:0 0 0 0;" align="left">
								<td>
									<label>
										<input type="checkbox" groups="category_{$children.id}[]" name="category_{$items.id}[]" class="checkboxCtrl" {if $user_authes[$children.id]}checked{/if}/>{$children.authority_name}
									</label>
								</td>
								<td>
								{foreach item=child from=$children.childs}
									<label>
										<input type="checkbox" name="category_{$items.id}[]" tag="category_{$children.id}[]" value="{$child.id}" {if ($user_authes[$children.id] and in_array($child.id ,$user_authes[$children.id]))}checked{/if}/>{$child.authority_name}
									</label>
								{/foreach}
								</td>
							</tr>
						{/foreach}
					{/foreach}
				</tbody>
			</table></center>
			<!--end table 表格-->
			
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
